package cn.wenhaha.app.mapping.bean;

public enum MappingType {

    column("column","字段"),
    constant("constant","常量"),
    targetLookup("targetLookup","目标源查找"),
    sourceLookup("sourceLookup","本源查找"),
    custom("custom","自定义")
    ;

    private  String id;
    private  String name;

    MappingType(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public String getName() {
        return name;
    }


    public static MappingType findByQueryType(String name){
        for (MappingType q:values()) {
            if (q.id.equals(name)){
                return  q;
            }
        }
        return null;
    }
}
